<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form id="testForm">
    <input type="text" id="txtContent" name="txtContent"><br>
    <input type="file" id="cover" name="cover"><br>
    <input type="file" name="multiFile" multiple id="multiFile">
    <br>
    <button type="button" id="btnSave">保存</button>

</form>
</body>

<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
<script>
    $(function () {
        $('#btnSave').click(function () {
            $.ajax({
                url: 'upload_img.do',
                data: new FormData($('#testForm').get(0)),
                dataType: 'json',
                type: 'post',
                processData: false,
                contentType: false
            }).done(function (data) {

            }).fail(function () {

            })
        })
    })

</script>
</html>